<template>
	<view class="order">
		<view class="my-order">
			<text class="my-order-text">我的订单</text>
			<text @click="open" class="my-order-all">全部订单 <text class="iconfont icon-arrow-right"></text> </text>
		</view>
		<view class='order-list'>
			<view class='order-list-item'>
				<uni-badge :text='userCount.waitPay' type="error" size="small" absolute="rightTop">
					<text class="iconfont icon-daifukuan order-icon"></text>
				</uni-badge><br />
				<text>待付款</text>
			</view>
			<view class='order-list-item'>
				<uni-badge :text='userCount.waitSend' type="error" size="small" absolute="rightTop">
					<text class="iconfont icon-daifukuan order-icon"></text>
				</uni-badge><br />
				<text>待配送/自提</text>
			</view>
			<view class='order-list-item'>
				<uni-badge :text='userCount.sending' type="error" size="small" absolute="rightTop">
					<text class="iconfont icon-peisongzhong order-icon"></text>
				</uni-badge><br />
				<text>配送中</text>
			</view>
			<view class=' order-list-item'>
				<uni-badge :text='userCount.postsale' type="error" size="small" absolute="rightTop">
					<text class="iconfont icon-shouhou order-icon"></text>
				</uni-badge><br />
				<text>售后</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			userCount: {
				type: Object,
				default: {}
			}
		},
		data() {
			return {

			}
		},
		methods: {
			open() {
				uni.navigateTo({
					url: '/pages/myOrder/myOrder'
				})
			}
		}
	}
</script>

<style>
	/* 我的订单 */
	.order {
		width: 90%;
		background: #fff;
		border-radius: 10px;
		padding: 0 15px;
		box-sizing: border-box;
		margin: auto;
		margin-top: 40px;
		height: 130px;
		font-size: 14px;
	}

	.my-order {
		height: 50px;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
.my-order-text{
	font-size: 16px;
}
	.my-order-all {
		color: #A0A0A0;
		font-size: 12px;
	}

	.order-list {
		display: flex;
		align-items: center;
		margin-top: 15px;
	}

	.order-list-item {
		text-align: center;
		line-height: 24px;
		font-size: 14px;
		width: 25%;
	}

	.icon-arrow-right {
		font-weight: bold;
	}

	.order-icon {
		color: #FD3B55;
		font-size: 16px;
	}
</style>
